home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Cafe 3
/
Visual Cafe 3.ISO
/
Vcafe
/
Main.bin
/
ImageIconBeanInfo.java
< prev
next >
Wrap
Text File
|
1998-10-21
|
2KB
|
59 lines
package com.symantec.itools.swing.icons;
import java.beans.*;
import java.util.ResourceBundle;
import com.symantec.itools.swing.DesignTimeResourceBundle;
import com.symantec.itools.vcafe.beans.PropertyDescriptorAttributes;
import com.symantec.itools.vcafe.beans.PropertyHelpIDs;
public final class ImageIconBeanInfo
extends com.symantec.itools.beans.HelperBeanInfo
{
public ImageIconBeanInfo()
{
ResourceBundle resources = ResourceBundle.getBundle("com.symantec.itools.swing.DesignTimeResourceBundle");
setComponentLibraryFolder(resources.getString(DesignTimeResourceBundle.ICONS_FOLDER_KEY));
set16x16ColorIconName("ImageIcon.gif");
}
protected Class getBeanClass()
{
return ImageIcon.class;
}
public PropertyDescriptor[] getPropertyDescriptors()
{
try
{
Class beanClass = getBeanClass();
PropertyDescriptor imageLocation = new PropertyDescriptor("imageLocation", beanClass);
imageLocation.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.IMAGEICON_IMAGE_LOCATION_HELP_ID));
PropertyDescriptor imageObserver = new PropertyDescriptor("imageObserver", beanClass);
imageObserver.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.IMAGEICON_IMAGE_OBSERVER_HELP_ID));
PropertyDescriptor[] rv = { imageLocation, imageObserver };
return rv;
}
catch(IntrospectionException e)
{
e.printStackTrace();
}
//Error, return no properties
return new PropertyDescriptor[0];
}
protected void modifyBeanDescriptor(BeanDescriptor beanDescriptor)
{
super.modifyBeanDescriptor(beanDescriptor);
beanDescriptor.setValue("WINHELP", winHelpID);
}
protected final static String winHelpID = "0x6013A";
}